import { IPSDEActionGroup } from './ipsdeaction-group';
import { IPSDEActionGroupDetail } from './ipsdeaction-group-detail';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEActionGroupImpl extends PSModelObjectImpl implements IPSDEActionGroup {
  get codeName(): string {
    return this.M.codeName;
  }

  get codeName2(): string {
    return this.M.codeName2;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get extendMode(): 0 | 2 {
    return this.M.extendMode != null ? this.M.extendMode : 0;
  }

  get groupTag(): string {
    return this.M.groupTag;
  }

  get groupTag2(): string {
    return this.M.groupTag2;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  protected psdeactiongroupdetails: IPSDEActionGroupDetail[] | null = null;

  getPSDEActionGroupDetails(): IPSDEActionGroupDetail[] | null {
    if (this.psdeactiongroupdetails == null) {
      this.psdeactiongroupdetails = this.fillChildListModel(this.M.getPSDEActionGroupDetails, 'dataentity.action.IPSDEActionGroupDetail') as IPSDEActionGroupDetail[];
    }
    return this.psdeactiongroupdetails;
  }

  get psDEActionGroupDetails(): IPSDEActionGroupDetail[] | null {
    return this.getPSDEActionGroupDetails();
  }

  findPSDEActionGroupDetail(objKey: any): IPSDEActionGroupDetail | null {
    return this.getPSModel5('dataentity.action.IPSDEActionGroupDetail', this.getPSDEActionGroupDetails(), objKey) as IPSDEActionGroupDetail;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get cls(): string {
    return 'PSDEActionGroupImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'dataentity.action.IPSDEActionGroup') return true;
    return super.instanceof(cls);
  }
}
